package com.itheima.tliaswebmanagement.filter;


import jakarta.servlet.*;
import jakarta.servlet.annotation.WebFilter;

import java.io.IOException;

/**
 * @Description DemoFilter
 * @Author ziguan ling
 * @Date 2025--01--11
 */
//@WebFilter("/*")
public class DemoFilter implements Filter {

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("执行了Demo1Filter拦截请求代码");

        filterChain.doFilter(servletRequest, servletResponse);

        System.out.println("执行了Demo1Filter拦截响应代码");
    }
}
